package model.actor;

import com.egghiro.framework.j2se.game.core.view.canvas.SGraphics;
import com.hiro.framework.tilegame.action.element.MoveTo;
import com.hiro.framework.tilegame.model.actor.Tile;
import com.hiro.framework.tilegame.model.actor.TileBoard;

public class S2048TileBoard extends TileBoard{
    
    @Override
    public void initailize() {
        super.initailize();
        
        this.addTile();
    }
    
    @Override
    public void reset() {
        // TODO Auto-generated method stub
        
    }

    @Override
    public boolean isGameOver() {
        // TODO
        return false;
    }

    @Override
    public boolean isCleared() {
        // TODO
        return false;
    }
    
    protected void addTile(){
        // TODO
    }
    
    @Override
    public void moveTiles(MoveTo moveTo) {
        // TODO Auto-generated method stub
        
    }
    
    @Override
    public void actAfterMoveTiles() {
        this.addTile();
    }
    
    @Override
    public void paint(SGraphics graphics) {
        // tileが重なるから。。。そのままpaintはできないか。。。
        // ⇒まだ動いているtileを先にpaintすればいい
        for (Tile tile : tileList) {
            if (tile.isInPosition() == false && tile.isVisible()) {
                tile.paint(graphics);
            }
        }
        
        for (Tile tile : tileList) {
            if (tile.isInPosition() && tile.isVisible()) {
                tile.paint(graphics);
            }
        }
    }

}
